//
//  HJSupportMessageController.h
//  KaiChat
//
//  Created by lx on 2023/12/28.
//

#import <UIKit/UIKit.h>
#import "HJChatSessionModel.h"
#import "HJChatMessageLayout.h"
#import "HJChatMessageCell.h"

NS_ASSUME_NONNULL_BEGIN

@class HJSupportMessageController;

@protocol HJSupportMessageControllerDelegate <NSObject>

@optional

- (void)didTapInMessageController:(HJSupportMessageController *)controller;
- (void)messageController:(HJSupportMessageController *)controller onSelectMessageAvatar:(HJChatMessageCell *)cell;
- (void)messageController:(HJSupportMessageController *)controller onLongSelectMessageAvatar:(HJChatMessageCell *)cell;
- (void)messageController:(HJSupportMessageController *)controller onSelectMessageContent:(HJChatMessageCell *)cell;
- (void)messageController:(HJSupportMessageController *)controller didClickRetryButton:(HJChatMessageCell *)cell;
- (void)messageControllerNeedResetInput:(HJSupportMessageController *)controller;


@end

@interface HJSupportMessageController : UITableViewController

@property (nonatomic, strong) NSMutableArray <HJChatMessageLayout *>*messageLayouts;
@property (nonatomic, strong) HJChatSessionModel *sessionModel;
@property (nonatomic, weak) id <HJSupportMessageControllerDelegate> delegate;

- (void)updateMessage:(HJChatMessageModel *)messageModel;
- (void)addNewMessage:(HJChatMessageLayout *)messageLayout;

- (void)scrollToBottom:(BOOL)animate;


@end

NS_ASSUME_NONNULL_END
